package com.sann.config;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import com.sann.spring.Yellow;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import javax.sql.DataSource;

@Configuration("sc")
@Import(JdbcConfig.class)
public class SpringConfig {

    public SpringConfig(){
        System.out.println("SpringConfig 构造器被调用......");
    }

    @Bean("yellow")
    public Yellow createYellow(){
        return new Yellow();
    }

}
